<template>
	<view class="search-container" :style="{ backgroundColor: bgcolor }">
		<view class="search-box" @click="$emit('click')" :style="{ borderRadius: radius + 'px' }">
			<uni-icons type="search" size="17"></uni-icons>
			<text>搜索</text>
		</view>
	</view>
</template>

<script>
	export default {
		name: "my-search",
		props: {
			bgcolor: {
				type: String,
				default: '#f00'
			},
			radius: {
				type: Number,
				default: 18
			}
		},


	}
</script>

<style lang="scss">
	.search-container {
		height: 100rpx;
		background-color: #f00;
		padding: 0 20rpx;
		display: flex;
		align-items: center;

		.search-box {
			height: 72rpx;
			width: 100%;
			border-radius: 36rpx;
			background-color: #fff;
			display: flex;
			justify-content: center;
			align-items: center;

			text {
				font-size: 32rpx;
				margin-left: 6rpx;
			}
		}
	}
</style>
